package com.espirit.file;

import java.nio.file.Path;
import java.util.Set;
import java.util.concurrent.Callable;

public class FileScanTask implements Callable<Set<NFile>> {
	
	private Path path;
	
	private Boolean ignoreSubDir = Boolean.FALSE;
	
	public FileScanTask(Path path){
		this.path = path;
	}
	
	public FileScanTask(Path path,Boolean ignoreSubDir){
		this.path = path;
		this.ignoreSubDir = ignoreSubDir;
	}
	

	@Override
	public Set<NFile> call() throws Exception {
		return FileScanner.scan(path,ignoreSubDir);
	}

}
